The amount of time (referred to as expansion speed) and the amount of memory (referred to as working storage space) needed to decompress already compressed data are common issues when designing a compression/decompression system. It is generally desirable to be able to expand compressed data as quickly as possible while at the same time using a minimum of available working memory. This is particularly true with play-back decompression application situations (where time can be spent to compress data in a particular way that makes decompression a faster process) and with software installation programs (which oftentimes do not have control over, or access to, all of the memory generally available to the user environment).
Various approaches have been taken in the past to improve expansion speed and to reduce working storage space. It is typical in these prior approaches to utilize two separate buffers in the decompression process. Referring now to FIG. 1, typically two data buffers are allocated at the beginning of the expansion process, one for holding the compressed data (Input Buffer 101), and the other for holding the expanded data (Output Buffer 105).
The compressed data is typically fetched from an external storage device and is placed in Input Buffer 101 before the expansion process begins. Then, the compressed data is read from Input Buffer 101, piece by piece or block by block a codeword at a time, and is expanded by the decompression engine 103. The resulting decompressed blocks are then placed in Output Buffer 105, as shown in the figure. Lastly, the decompressed data is moved out of Output Buffer 105 and into some other longer term storage medium or area, e.g., available working space in system RAM, an internal hard drive, etc., for later use.
Unfortunately, this double buffer requirement (having both an input buffer and an output buffer) is very undesirable, particularly in a small working memory environment such as typically exists with a portable device, and is counter to one of the basic objectives of reducing the amount of working memory space needed for the decompression process.
The present invention utilizes a single buffer to decompress already compressed data and thus reduces the amount of working memory space needed.